﻿using Dapper;
using System;
using BCEntity.Sim.StaffNotification;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading.Tasks;

namespace BCData.Sim.StaffNotification
{
    /// <summary>
    /// 员工通知信息
    /// </summary>
	public interface IStaffNotificationData
    {
        #region  成员方法
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="staffNotificationId">员工通知信息Id</param>
        Task<bool> Exists(long staffNotificationId);
        /// <summary>
        /// 增加员工通知信息
        /// </summary>
        /// <param name="entity">员工通知信息信息</param>
        Task<StaffNotificationEntity> Add(StaffNotificationEntity entity);
        /// <summary>
        /// 更新员工通知信息
        /// </summary>
        /// <param name="entity">员工通知信息信息</param>
        Task<StaffNotificationEntity> Update(StaffNotificationEntity entity);
        /// <summary>
        /// 删除员工通知信息
        /// </summary>
        /// <param name="staffNotificationId">员工通知信息Id</param>
        Task<bool> Delete(long staffNotificationId);
        /// <summary>
        /// 获取员工通知信息
        /// </summary>
        /// <param name="staffNotificationId">员工通知信息Id</param>
        Task<StaffNotificationEntity> GetEntity(long staffNotificationId);
        /// <summary>
        /// 获取员工未读通知信息数量
        /// </summary>
        /// <param name="adminId">接收人Id</param>
        Task<int> GetNoneReadCount(long adminId);
        /// <summary>
        /// 获取员工通知信息分页列表
        /// </summary>
        /// <param name="adminId">接收人Id</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="sortName">排序字段</param>
        /// <param name="ascending">升序</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页数据条数</param>
        Task<(IEnumerable<StaffNotificationEntity>, int)> Query(long adminId, DateTime? start, DateTime? end, string sortName, bool? ascending, int pageIndex, int pageSize);
        #endregion  成员方法
    }
}
